//=============================================================================
// Class: KEG::Texture
// And function for loading textures
//  Basic struct with information about texture
// 
//
// Bodhi Crandall-Rus (boder.us)
// Sept 10, 2006
//=============================================================================

#ifndef TEXTURE_HPP
#define TEXTURE_HPP

#include "glee.h"

#include "common.hpp"

namespace KEG
{
	struct Texture
	{
		GLuint Tex;
		int Width;
		int Height;
		bool Alpha;
		bool Blend;

		bool Load( const std::string& filename );
		void Release();
		static void ReleaseAll();
	private:
		void DestroyMagentaAndSetFlags( std::vector< unsigned char >& image );
		void GrowNextPow2( std::vector< unsigned char >& image );
		bool Create( const std::string& filename );

		//bool DuplicateTex( const std::string& filename, KEG::Texture& );
	};
}

#endif
